import { constantRoutes } from '@/router'
export default {
  namespaced: true,
  state: () => {
    return {
      menuList: [...constantRoutes] // 菜单列表：静态的 + 动态的
    }
  },
  mutations: {
    // 设置菜单 :asyncRoutes = [{path:'/employees', compnents......}]
    setMenuList(state, asyncRoutes) {
      state.menuList = [...constantRoutes, ...asyncRoutes]
    }
  }
}
